// 获取文字看板
export interface GetTextBoardParamsType {
	businessCode: string;
	businessType: number;
	searchValue?: string;
	lessonId?: number;
	isFilter?: number;
	sensitiveFilter?: number;
}

export interface TextBoardItem {
	bg: string;
	ed: string;
	lessonId: number;
	onebest: string;
	speaker: string;
}

// 获取文字看板响应
export type GetTextBoardResponseType = TextBoardItem[];

// 获取AI章节
export interface GetAiChapterAllParamsType {
	businessCode: string;
}

export interface AiChapterItem {
	startTime: number;
	endTime: number;
	content: string;
	label: string;
	mainClass: string;
	mainClassName: string;
	subClass: string;
	subClassName: string;
	labelName: string;
	summary: string;
	title: string;
	topicTypes: string;
}

export interface GetAiChapterAllResponseType {
	list: AiChapterItem[];
}

// PPT
export interface PPTItemType {
	time: number;
	pictureUrl: string;
}

export type GetPPTListResponseType = PPTItemType[];

// 获取课堂切片列表
export interface GetSliceByLessonCodeParamsType {
	lessonCode: string;
	sliceType?: string;
	indicatorCodes?: string[];
	businessType?: number;
}

export interface LessonSliceListItemType {
	id?: number;
	sliceId?: number;
	sliceType?: string;
	sliceTypeName?: string;
	startTime: number;
	endTime: number;
	indicatorCode?: string;
	indicatorName?: string;
	title: string;
	summary: string;
	qusType?: number;
}

export type GetSliceByLessonCodeResponseType = LessonSliceListItemType[];

// 查询教师引导提问
export interface GetLLMTeacherLeadQusParamsType {
	businessCode: string;
	businessType?: number;
}

export type GetLLMTeacherLeadQusResponseType = LessonSliceListItemType[];

// 获取指标分组列表
export interface SliceTypeListItemType {
	sliceType: string;
	sliceTypeName: string;
}
export type GetSliceTypeListResponseType = SliceTypeListItemType[];

// AI分析结果
export interface GetAnalysisResultResponseType {
	abnormalType: string;
	activityAvg: number;
	beginTime: number;
	createTime: number;
	earlyStopTime: number;
	endTime: number;
	focusAvg: number;
	id: number;
	interactiveStudentNum: number;
	interactiveTime: number;
	lastActivityAvg: number;
	lastFocusAvg: number;
	lateBeginTime: number;
	lateStopTime: number;
	lessonCode: string;
	lessonEffectiveDuration: number;
	lessonStatus: number;
	longTeachTime: number;
	speakerStudentNum: number;
	speedAvg: number;
	speedMax: number;
	speedMin: number;
	studentCount: number;
	teachTime: number;
	totalTime: number;
	updateTime: number;
	usePhone: number;
	volAvg: number;
	volGrade1Per: number;
	volGrade2Per: number;
	volGrade3Per: number;
}

// 指定课堂关键事件分布信息
export interface EventLineItemType {
	createTime: number;
	eventTime: number;
	eventType: number;
	id: number;
	lessonCode: string;
	speakerId: number;
	updateTime: number;
}
export type GetEventTimeLineResponseType = EventLineItemType[];

// 课堂讲课时间轴
export interface GetAudioTaskTimeTableParamsType {
	businessCode: string;
	timeInterval: number;
}

export interface AudioTaskTimeTableItemType {
	bg: number;
	ed: number;
	speaker: string;
}

export type GetAudioTaskTimeTableResponseType = AudioTaskTimeTableItemType[];

// 获取一节课老师轨迹统计信息
export interface GetLessonTeacherPathParamsType {
	lessonCode: string;
}

export interface PathInfoItemType {
	areaType: string;
	imageUrl: string;
	x: number;
	y: number;
	startTime: number;
	endTime: number;
}

export interface GetLessonTeacherPathResponseType {
	endTime: number;
	lecternAreaDuration: number;
	lecternAreaPersistDurationList: {
		startTime: number;
		endTime: number;
	}[];
	lessonCode: string;
	lessonStartLecternAreaProp: number;
	pathInfo: PathInfoItemType[];
	patrolTimes: number;
	startTime: number;
	streamDeviceIp: string;
	streamUrl: number;
	studentAreaDuration: number;
	teachAreaDuration: number;
	toStudentAreaTimes: number;
}

// 获取一节课老师行为统计信息
export interface GetLessonTeacherBehaviorParamsType {
	lessonCode: string;
}

export interface BehaviorsInfoItemType {
	behaviorType: string;
	startTime: number;
	endTime: number;
	imageUrl: string;
}

export interface GetLessonTeacherBehaviorResponseType {
	answerphoneDuration: number;
	answerphoneTimes: number;
	behaviorsInfo: BehaviorsInfoItemType[];
	bowingDuration: number;
	bowingTimes: number;
	endTime: number;
	explainingDuration: number;
	explainingTimes: number;
	leaningDuration: number;
	leaningTimes: number;
	lessonCode: string;
	sittingDuration: number;
	sittingTimes: number;
	standingDuration: number;
	standingTimes: number;
	startTime: number;
	streamDeviceIp: string;
	streamUrl: string;
	usePhoneDuration: number;
	usePhoneTimes: number;
	walkingDuration: number;
	walkingTimes: number;
	writingDuration: number;
	writingTimes: number;
}

// 音量
export interface GetAudioVolTaskResultResponseType {
	list: {
		time: number;
		db: number;
	}[];
	total: {
		avgVol: number;
		maxVol: number;
		minVol: number;
		totalCount: number;
		totalTime: number;
	};
}

// 语速
export interface GetAudioTaskSpeakSpeedTimeTableParamsType {
	businessCode: string;
	timeInterval: number;
}

export interface GetAudioTaskSpeakSpeedTimeTableResponseType {
	list: {
		bg: number;
		ed: number;
		count: number;
		speed: number;
	}[];
	total: {
		avgSpeed: number;
		maxSpeed: number;
		minSpeed: number;
		totalCount: number;
		totalTime: number;
	};
}

// 查询指定课堂习惯用语、敏感词识别结果
export interface GetSpecialWordResultParamsType {
	lessonCode: string;
	lexiconType: number;
}

export interface SpecialWordResultItemType {
	countNum: number;
	earlyTime: number;
	lateTime: number;
	lessonCode: string;
	name: string;
	speakerId: number;
}

export type GetSpecialWordResultResponseType = SpecialWordResultItemType[];

// 查询AI课堂知识点
export interface GetKeyWordResultParamsType {
	businessCode: string;
}

export interface KeyWordResultItemType {
	earlyTime?: number;
	countNum: number;
	name: string;
}

export type GetKeyWordResultResponseType = KeyWordResultItemType[];

// 指定课堂出勤情况
export interface GetAILessonAttendResponseType {
	attendanceStudentNum: number;
	attendanceStudentRate: number;
	frontRowSeats: number;
	frontStudentNum: number;
	frontStudentRate: number;
	lastLessonAttendanceStudentNum: number;
	lastLessonFrontStudentNum: number;
	lessonCode: string;
	shouldStudentNum: number;
	totalStudentSeats: number;
	picUrl: string;
	lateNum: number;
	leaveEarlyNum: number;
}

// 指定课堂行为详细数据
export interface BehaviorDataItemType {
	behaviorType: string;
	coordinate: string;
	markImgUrl: string;
	num: number;
	occurTime: string;
	picUrl: string;
	streamName: string;
	videoTime?: number;
}

export interface LessonBehaviorDetailItemType {
	activityAvg: number;
	focusAvg: number;
	orders: number;
	behaviorData: BehaviorDataItemType[];
}

export interface GetAILessonBehaviorDetailResponseType {
	filterResultList: LessonBehaviorDetailItemType[];
	sourceResultList: LessonBehaviorDetailItemType[];
}

// 指定课堂行为统计数据
export type StudentNodeKeyType =
	| 'readAndWrite'
	| 'read'
	| 'write'
	| 'normal'
	| 'hand'
	| 'stand'
	| 'sleep'
	| 'phone'
	| 'test'
	| 'bowingTheHead'
	| 'turnBack'
	| 'attend';

export interface BehaviorStatItemType {
	behaviorType: StudentNodeKeyType;
	createTime: number;
	id: number;
	lessonCode: string;
	num: number;
	updateTime: number;
}

export type GetAILessonBehaviorStatResponseType = BehaviorStatItemType[];

// 指定课堂互动统计情况
export interface GetInteractiveResultResponseType {
	total: {
		interactiveTime: number;
	};
	list: {
		speakerId: number;
		speakTotalTime: number;
		earlySpeakTime: number;
	}[];
}

// 查询指定课堂AI教学内容总结结果
export interface GetSummaryContentParamsType {
	businessCode: string;
}

// 大语言模型评分结果
export interface GetLLMScoreResultParamsType {
	businessCode: string;
	type: number;
}

export interface GetLLMScoreResultResponseType {
	type: number;
	score: number;
	overall: string;
	scoreReason: string;
}
